<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set var="cp" value="<%=request.getContextPath() %>"></c:set>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>my-admin1.0</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,ch0rome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" href="lib/layui/css/layui.css">
    <script src="lib/layui/layui.js" charset="utf-8"></script>
    <script src="<c:url value='/js/jquery.min.js'/>"></script>
    <script src="<c:url value='/ueditor/ueditor.config.js'/>"></script>
	<script src="<c:url value='/ueditor/ueditor.all.min.js'/>"></script>
</head>
<body class="child-body" style="padding: 10px 15px 15px 15px">     
<div class="child-nav">
    <span class="layui-breadcrumb" style="visibility: visible;">
         <a>我的工作台</a><span lay-separator="">/</span>
         <a><cite>发表文章</cite></a>
    </span>
</div>
<hr class="layui-bg-gray">
<form class="layui-form" action="addWz.htm"  method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">标题：</label>
    <div class="layui-input-block">
      <input type="text" name="title" lay-verify="required"  maxlength="50" autocomplete="off" placeholder="请输入标题" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">内容：</label>
    <div class="layui-input-block">
    <textarea   id="eventIntroduct" name="path"  lay-verify="content" ></textarea>
<textarea name="path" class="layui-textarea" id="content" lay-verify="content"  style="display: none;" placeholder="请输入内容"></textarea>
  </div>
  </div>
 <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="formDemo">立即提交</button>
      <button type="button"  onclick="history.go(-1)"  class="layui-btn layui-btn-primary">返回上级</button>
    </div>
  </div>
</form>

<script>
var ue;
$(function(){
	if(ue){ue.destroy();}
	 ue = UE.getEditor('eventIntroduct',{
	    //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
	  /*   toolbars:[[
	               'fullscreen', 'source', '|', 'undo', 'redo', '|',
	               'bold', 'italic', 'underline', 'indent', 'formatmatch', 'autotypeset', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist','|',
	               'simpleupload','|',
	               'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
	               'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','link', 'unlink'
	           ]], */
	    //关闭字数统计
	    wordCount:false,
	    //关闭elementPath
	    elementPathEnabled:false,
	    //默认的编辑区域高度
	    initialFrameHeight:450,
	    initialFrameWidth:1010,

	})
	
})
layui.use('form', function(){
  var form = layui.form;
  
  form.verify({
	  content: function(value){
		  ue.sync();
		  var content = ue.getContent()
	      if(content.length < 1){
	        return '内容不为空！';
	      }
	    }
	  });
});
</script>	
</body>
</html>